home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: June 2000
- // Author: alipka
- //
- // Description:
- // Option tool property window for Artisan tools
- //
- //
- // Procedure Name:
- // artSelectValues
- //
- // Description:
- // Initialize the option values.
- //
- // Input Arguments:
- //
- // Return Value:
- // None.
- //
-
- proc artFluidAttrAttributeValues( string $artCommand, string $currTool )
- {
- string $autoSaveCmd = eval( $artCommand + " -q -as `currentCtx` " );
- checkBoxGrp -e -v1 ($autoSaveCmd != "artFluidAttrConfirmPaintLoss")
- artFluidAutoSave;
-
- int $allowImportExport = true;
- string $attr = eval( $artCommand + " -q -p `currentCtx` " );
-
- if( $attr == "color" ) {
- $attr = "Color";
- } else if( $attr == "temperature" ) {
- $attr = "Temperature";
- } else if( $attr == "fuel" ) {
- $attr = "Fuel";
- } else if( $attr == "velocity" ) {
- $attr = "Velocity";
- } else if( $attr == "densityAndColor" ) {
- $attr = "Density and Color";
- } else if( $attr == "densityAndFuel" ) {
- $attr = "Density and Fuel";
- } else {
- $attr = "Density";
- }
-
- string $oper = eval( $artCommand + " -q -selectedattroper `currentCtx`" );
- int $smooth = ( $oper == "smooth" );
- int $scale = ( $oper == "scale" );
-
- int $dispAsRender = eval( $artCommand + " -q -dar `currentCtx` " );
- radioButtonGrp -e -sl ($dispAsRender+1) artFluidDisplayAsRender;
-
- int $dispVelocity = eval( $artCommand + " -q -dv `currentCtx` " );
- checkBoxGrp -e -v1 $dispVelocity artFluidDisplayVelocity;
-
- optionMenuGrp -e -v $attr artAttrListOptionMenu;
-
- float $color[3] = eval( $artCommand + " -q -rgb `currentCtx` " );
- colorSliderGrp -e
- -en ( !$smooth && (($attr == "Color") || ($attr == "Density and Color")) )
- -rgb $color[0] $color[1] $color[2] artFluidColorSlider;
-
- int $useIt = eval( $artCommand + " -q -usd `currentCtx` " );
- int $select = $useIt == 1 ? 1 : 2;
- radioButtonGrp -e
- -en (!$smooth && !$scale && ($attr == "Velocity"))
- -select $select artFluidStrokeDirection;
-
- float $velocity[] = eval( $artCommand + " -q -v `currentCtx` " );
- floatFieldGrp -e
- -en ( !$smooth && !$scale && ($attr == "Velocity") && ($select == 2))
- -v1 $velocity[0]
- -v2 $velocity[1]
- -v3 $velocity[2]
- artFluidSpecifiedVelocity;
-
-
- // Disable the Value slider for Color painting
- //
- floatSliderGrp -e -en (!$smooth && ($attr != "Color")) artAttrValueSlider;
- floatFieldGrp -e -en ($attr != "Color") artAttrMinMaxValue;
- checkBoxGrp -e -en ($attr != "Color") artAttrClampChkBox;
- floatFieldGrp -e -en ($attr != "Color") artAttrClampField;
-
- // Cannot export/import Velocity or Color+Density.
- //
- button -e -en $allowImportExport importMapBrowseButton;
- button -e -en $allowImportExport exportMapBrowseButton;
-
- // Update the drawing parameters on the geometry to reflect
- // the menu selection.
- //
- // artFluidAttrPaintMenu $artCommand;
- }
-
- // =======================================================
- // Main callback procedure for Paint Selecion tool.
- // =======================================================
- global proc artFluidAttrValues( string $toolName ) {
- source "artisanCallback.mel";
- source "artisanValues.mel";
-
- source "artAttrValues.mel";
-
- string $parent = (`toolPropertyWindow -q -location` + "|artFluidAttr");
- setParent $parent;
-
- string $artCommand = "artFluidAttrCtx";
-
- string $currContext = `currentCtx`;
- string $currTool = `contextInfo -c $currContext`;
-
- // Provide a different icon for different attribute tools.
- string $icon = "fluidPaint.xpm";
- string $helpTag = "PaintFluidsTool";
-
- toolPropertySetCommon $toolName $icon $helpTag;
-
- // Brush frameLayout values.
- artisanBrushValues( $artCommand, $currTool );
-
- // Paint Attribute frameLayout values.
- artFluidAttrAttributeValues( $artCommand, $currTool );
-
- // Paint Attribute frameLayout values.
- artAttrPaintValues( $artCommand, $currTool );
-
- // Stroke frameLayout values.
- artisanStrokeValues( $artCommand, $currTool );
-
- // Stylus Pressure frameLayout values.
- artisanPressureValues( $artCommand, $currTool );
-
- // Attribute Maps frameLayout values.
- artisanAttrMapValues( $artCommand, $currTool );
-
- // Display frameLayout values.
- artisanDisplayValues( $artCommand, $currTool );
-
- toolPropertySelect artFluidAttr;
- }
-